package com.ssy.lingxi.member.merchant.api.constant;

import com.ssy.lingxi.member.merchant.api.model.response.MapResponse;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 百度身份证验证配置项
 *
 * @author lqa
 * @version 2.0.0
 * @date 2022/1/12
 */
public enum AuthTypeEnum {
    BAI_DU(1, "百度");
    private final Integer code;
    private final String message;

    AuthTypeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public static List<MapResponse> getAll() {
        List<MapResponse> mapResponseList = new ArrayList<>();
        for (AuthTypeEnum anEnum : AuthTypeEnum.values()) {
            MapResponse mapResponse = new MapResponse();
            mapResponse.setKey(String.valueOf(anEnum.getCode()));
            mapResponse.setValue(anEnum.getMessage());
            mapResponseList.add(mapResponse);
        }
        return mapResponseList;
    }
}
